package ch1;

import java.util.Scanner;

public class VisitorTest {
    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        boolean isExit =false;
        while(!isExit){
            System.out.println("***************************");
            System.out.println("请输入游客的姓名：");
            Visitor v = new Visitor();
            v.name=scan.next();
            System.out.println("请输入游客"+v.name+"年龄：");
            v.age=scan.nextInt();
            v.show();
            System.out.println("***************************");
            System.out.print("是否退出（是/否）:");
            String exit =scan.next();
            if(exit.equals("是")){
                isExit=true;
            }
        }
    }
}
